home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 5
/
Aminet 5 - March 1995.iso
/
Aminet
/
util
/
boot
/
vbrmov23.lha
/
VBRClear.asm
< prev
next >
Wrap
Assembly Source File
|
1994-04-24
|
2KB
|
88 lines
nolist
;:ts=8
*****************************************************************
* *
* VBRClear version 1.0, © 1991 Arthur Hagen, All rights reserved*
* *
* Posted to the Public Domain. *
* *
* Written using the Aztec Manx C 5.0 Assembler *
* *
* All comments deliberately stripped from source. *
* If you don't understand it, you should not mess with it! *
* *
*****************************************************************
include 'exec/execbase.i'
xref _LVOOldOpenLibrary
xref _LVOCloseLibrary
xref _LVOSuperState
xref _LVOOutput
xref _LVOWrite
xref _LVOAllocMem
xref _LVOPermit
xref _LVOFreeMem
list
machine mc68010
public _VBRMove
_VBRMove:
movea.l (4).w,a6
lea dosname(pc),a1
jsr _LVOOldOpenLibrary(a6)
movea.l d0,a5
exg.l a5,a6
jsr _LVOOutput(a6)
exg.l a5,a6
move.l d0,d7
moveq #title_end-title,d3
lea title(pc),a0
bsr.s wrt
btst #AFB_68010,AttnFlags+1(a6)
beq.s wrong
jsr _LVOSuperState(a6)
moveq #0,d1
movec VBR,d2
movec d1,VBR
move.l sp,USP
movea.l d0,sp
andi.w #$dfff,SR
tst.l d2
beq.s alrdy
move.l d2,a1
moveq #$40,d0
rol.w #4,d0
jsr _LVOFreeMem(a6)
quit movea.l a5,a1
jmp _LVOCloseLibrary(a6)
wrong moveq #wrongpro_end-wrongpro,d3
lea wrongpro(pc),a0
writerr pea quit(pc)
wrt move.l a0,d2
move.l d7,d1
exg.l a5,a6
jsr _LVOWrite(a6)
exg.l a5,a6
rts
alrdy moveq #already_end-already,d3
lea already(pc),a0
bra.s writerr
dosname dc.b 'dos.library',0
dc.b '$VER: '
title dc.b 'VBRClear 1.0 (21.11.91)',$0A,$0D
dc.b 'Copyright ',$A9,' 1991 Arthur Hagen.',$0A
title_end
already dc.b 'VBR already clear!',$0A
already_end
wrongpro
dc.b 'You need 68010 or higher!',$0A
wrongpro_end
even
END